<el-form ref="form" :model="form" :rules="rules" label-width="140px">
    <el-row :gutter="10">
        <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
            <el-form-item label="产品编号" prop="GWAX001">
                <!--<el-select v-model="form.GWAX001" size="small" placeholder="请选择产品编号" @change="change1">
                    <el-option v-for="item in selectOptions.options1"
                               :key="item.GWAM001"
                               :label="item.GWAM001 + item.GWAML003 + item.GWAML004"
                               :value="item.GWAM001">
                    </el-option>
                </el-select>-->
                <el-input v-model="form.GWAX001" readonly :disabled="!isAdd" clearable @clear="clearGWAX001">
                    <i class="el-icon-search el-input__icon" @click="openCp('1')" slot="suffix" v-show="isAdd"></i>
                </el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
            <el-form-item label="品名">
                <el-input v-model="form.GWAML003" readOnly ></el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
            <el-form-item label="规格">
                <el-input v-model="form.GWAML004" readOnly></el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
            <el-form-item label="项次" prop="GWAX002">
                <el-input v-model="form.GWAX002" readOnly :disabled="!isAdd"></el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
            <el-form-item label="配件编号" prop="GWAX003">
                <!--<el-select v-model="form.GWAX003" size="small" placeholder="请选择配件编号" @change="change2">
                    <el-option v-for="item in selectOptions.options1"
                               :key="item.GWAM001"
                               :label="item.GWAM001 + item.GWAML003 + item.GWAML004"
                               :value="item.GWAM001">
                    </el-option>
                </el-select>-->
                <el-input v-model="form.GWAX003" readOnly :disabled="!isAdd" clearable @clear="clearGWAX003">
                    <i class="el-icon-search el-input__icon" @click="openCp('3')" slot="suffix" v-show="isAdd"></i>
                </el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
            <el-form-item label="品名">
                <el-input v-model="form.GWAML003_1" readOnly></el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
            <el-form-item label="规格">
                <el-input v-model="form.GWAML004_1" readOnly></el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
            <el-form-item label="产品单位">
                <el-select v-model="form.GWAX004" size="small" placeholder="请选择产品单位" clearable>
                    <el-option v-for="item in selectOptions.options2"
                               :key="item.GWAB001"
                               :label="item.GWAB001 + item.GWABL003"
                               :value="item.GWAB001">
                    </el-option>
                </el-select>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
            <el-form-item label="产品数量">
                <el-input type="number" min="0" v-model="form.GWAX005"></el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
            <el-form-item label="配件单位">
                <el-select v-model="form.GWAX006" size="small" placeholder="请选择配件单位" clearable>
                    <el-option v-for="item in selectOptions.options2"
                               :key="item.GWAB001"
                               :label="item.GWAB001 + item.GWABL003"
                               :value="item.GWAB001">
                    </el-option>
                </el-select>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
            <el-form-item label="配件数量">
                <el-input type="number" min="0" v-model="form.GWAX007"></el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
            <el-form-item label="生效日期" prop="GWAX008">
                <el-date-picker
                        v-model="form.GWAX008"
                        type="date"
                        :disabled="!isAdd"
                        placeholder="请选择生效日期"
                        value-format="yyyy-MM-dd" style="width:100%;">
                </el-date-picker>
            </el-form-item>
        </el-col>
        <el-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
            <el-form-item label="失效日期" prop="GWAX009">
                <el-date-picker
                        v-model="form.GWAX009"
                        type="date"
                        placeholder="请选择失效日期"
                        value-format="yyyy-MM-dd" style="width:100%;">
                </el-date-picker>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
            <el-form-item label="损耗率">
                <el-input v-model="form.GWAX010"></el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
            <el-form-item label="是否必须件">
                <el-select v-model="form.GWAX011" clearable>
                    <el-option v-for="item in selectOptions.gwax011" :label="item.value" :value="item.code"></el-option>
                </el-select>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
            <el-form-item label="有效" prop="GWAXACTI">
                <el-select v-model="form.GWAXACTI" clearable>
                    <el-option v-for="item in selectOptions.sys_y_n" :label="item.value" :value="item.code"></el-option>
                </el-select>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" style="text-align: right">
            <el-button icon="icon iconfont icon-23" size="mini" @click="cancel">关闭</el-button>
            <el-button type="warning" icon="icon iconfont icon-21" size="mini" @click="sure">保存</el-button>
        </el-col>
    </el-row>
</el-form>
<script>
    require(["pc/crm/gwai501_edit"], $.noop);
</script>